package com.lottery.material.service.portal.article.impl;

import com.lottery.material.dao.article.ArticleCompetitionInfoMapper;
import com.lottery.material.pojocustom.article.ArticleCompetitionInfoCustom;
import com.lottery.material.service.portal.article.ArticleCompetitionInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Description:    文章赛事内容服务实现类
 * Author:         sunny
 * CreateDate:     2019-04-19 13:39
 */
@Service
public class ArticleCompetitionInfoServiceImpl implements ArticleCompetitionInfoService {

    @Autowired
    private ArticleCompetitionInfoMapper articleCompetitionInfoMapper;

    /**
     * description: 根据文章id和赛事收费类型查询
     * author sunny
     * createDate 2019-04-19 下午 1:40
     * @param articleId
     * @param competitionChargeType
     * @return
     */
    @Override
    public List<Map<String, Object>> findByArticleIdAndType(String articleId, Integer competitionChargeType) {
        return articleCompetitionInfoMapper.findByArticleIdAndType(articleId, competitionChargeType);
    }

    /**
     * description: 根据文章id查询文章赛事
     * author sunny
     * createDate 2019-04-24 下午 7:51
     * @param articleId
     * @return
     */
    @Override
    public List<ArticleCompetitionInfoCustom> findByArticleId(String articleId) {
        return articleCompetitionInfoMapper.findByArticleId(articleId);
    }
}
